package com.hqsj;

import com.alibaba.fastjson.JSON;

/**
 * Created by huangying on 2017/3/8.
 */
public final class JSONUtil {
    /**
     * 从json获取指定key的字符串
     *
     * @param json json字符串
     * @param key  字符串的key
     * @return 指定key的值
     */
    public static Object getStringFromJSONObject(final String json, final String key) {
        return JSON.parseObject(json).getString(key);
    }
}
